package com.blankii.androidlibrary.fragments

import com.blankii.androidlibrary.base.BaseBindingFragment
import com.blankii.androidlibrary.databinding.FragmentTestBinding
import com.blankii.androidlibrary.exts.loge
import com.blankii.androidlibrary.utils.ViewClickContinuousUtil
import com.blankii.androidlibrary.utils.ViewClickContinuousUtil.ClickContinuousCallback

class TestFragment : BaseBindingFragment<FragmentTestBinding>(FragmentTestBinding::inflate) {
    override fun onCreateInit() {

    }

    override fun onInitView() {
        binding.apply {
            ViewClickContinuousUtil.setViewConfig(
                button1,
                2,
                2,
                object : ClickContinuousCallback {
                    override fun success() {
                        "连续点击成功".showSnackBar()
                    }

                    override fun currentCount(count: Int) {
                        "当前点击次数：$count".loge(TAG)
                    }
                })
        }
    }
}